use std::{env, process};

mod lib2; // use lib2::Config2;
fn main() {
  let args:Vec<String> = env::args().collect();
  println!("{:?}", args);
  let config = lib2::Config2::new(&args).unwrap_or_else(|err| {
    println!("this is err: {}", err);
    process::exit(1)
  });
  println!("query:{}; filename: {}", config.query, config.filename);
  if let Err(e) = lib2::run(config) {
    println!("读取阶段出错:{}", e);
    process::exit(1)
  }
}